package chap7;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class HashMapTest {
	public static void main(String args[]){
		Map scoreMap=new HashMap();
		scoreMap.put("200101004",new Float(85.5));
		scoreMap.put("200101002",new Float(76));
		scoreMap.put("200101001",new Float(88));
		scoreMap.put("200101003",new Float(90));

		Float score=(Float)scoreMap.get("200101001");
		System.out.println("sno: 200101001   score: "+score);
		
		Set snoSet=scoreMap.keySet();
		Iterator it=snoSet.iterator();
		Object sno=null;
		while(it.hasNext()){
		    sno=it.next();
		    System.out.println(scoreMap.get(sno));
		}


	}
}
